package main

import (
	"os/exec"
)

const (
	_ecodeProtoc = "protoc --proto_path=%s --proto_path=%s --proto_path=%s --ecode_out=:."
)

func installEcodeGen() error {
	return exec.Command("kratos", "tool", "check_install", "protoc-gen-ecode").Run()
}

func genEcode(files []string) error {
	return generate(_ecodeProtoc, files)
}
